package com.wechat.wechat.exception;

import com.wechat.wechat.enums.ResultEnum;
import lombok.Data;

/**
 * @author NN
 * @2020/2/20 15:53
 */
@Data
public class SellException extends RuntimeException{
    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code,String message) {
        super(message);
        this.code = code;
    }
}
